{% extends "base.html" %}
{% block content %}
    <div class="row">
        <div class="col-lg-6">
            {% if err_msg %}
                <div class="alert alert-danger alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    {{ err_msg }}
                </div>
            {% endif %}
            {% if info_msg %}
                <div class="alert alert-info alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    {{ info_msg }}
                </div>
            {% endif %}
            <div class="panel panel-default">
                <div class="panel-heading">
                    添加用户
                </div>
                <div class="panel-body">
                    <!-- Nav tabs -->
                    <form class="m-t" role="form" action="/admin/register_user" method="post">
                        <div class="form-group">
                            <input class="form-control" placeholder="用户名" name="username" type="email" {% if invitation_code %} autofocus {% endif %}>
                        </div>
                        <div class="form-group">
                            <input class="form-control" placeholder="输入密码" name="password" type="password">
                        </div>
                        <div class="form-group">
                            <input class="form-control" placeholder="再次输入密码" name="re_password" type="password">
                        </div>
        
                        <button type="submit" class="btn btn-primary block full-width m-b">注册</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block navibar %}
    <div class="col-lg-10">
        <h2>添加用户</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/">Home</a>
            </li>
            <li class="active">
                <strong>User</strong>
            </li>
        </ol>
    </div>
{% endblock %}
{% set active_page = "admin_settings" %}
